local kuidian = fk.CreateSkill {
    name = "ym1__kuidian",
}
Fk:loadTranslationTable{
    ["ym1__kuidian"] = "揆典",
    [":ym1__kuidian"] = "出牌阶段，你可将你的一条“引文”移给一名角色作为技能。（对你限两次）",

    ["$ym1__kuidian1"] = "释卷再读，知军国之情弊。",
    ["$ym1__kuidian2"] = "临渊而惕，慎兴亡于始终。",
}
kuidian:addEffect("active",{
    interaction = function (self, player)
        return UI.ComboBox {choices = player:getTableMark("@[ym1__yinwen]")}
    end,
    can_use = function (self, player)
        local mark = player:getTableMark("@[ym1__yinwen]")
        return #mark > 0
    end,
    card_num = 0,
    card_filter = Util.FalseFunc,
    target_num = 1,
    target_filter = function (self, player, to_select, selected, selected_cards)
        if to_select.id == player.id and player:getMark("ym1__kuidian") >= 2 then
            return false
        end
        return #selected == 0
    end,
    times = function(self)
        return Self.phase == Player.Play and 3 - Self:getMark("ym1__kuidian") or -1
    end,
    on_use = function (self, room, effect)
        local player = room:getPlayerById(effect.from.id)
        local target = room:getPlayerById(effect.tos[1].id)
        if player.id == target.id then
            room:addPlayerMark(player,"ym1__kuidian",1)
        end
        local skill = self.interaction.data
        local mark = player:getTableMark("@[ym1__yinwen]")
        table.removeOne(mark,skill)
        room:setPlayerMark(player,"@[ym1__yinwen]",mark)
        room:handleAddLoseSkills(target,skill)
    end,
})
kuidian:addAcquireEffect(function (self, player, is_start)
    if type(player:getMark("@[ym1__yinwen]")) ~= "table" then
        player.room:setPlayerMark(player,"@[ym1__yinwen]",{"ym1__yingzi"})
    end
end)
return kuidian